package com.dinzeer.mtrmod.Attribute;

import com.dinzeer.mtrmod.skills.skillmain;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.level.LevelAccessor;
import net.minecraftforge.eventbus.api.Event;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraft.world.entity.ai.attributes.AttributeModifier;
import net.minecraftforge.fml.common.Mod;

import java.util.UUID;
@Mod.EventBusSubscriber
public class test {
    @SubscribeEvent
    public static void execute(net.minecraftforge.event.level.LevelEvent.Load event) {
        if(!((LevelAccessor)event.getLevel()).isClientSide()) {

            changeattr.putattinattmap("minecraft:wooden_sword", new changeattr.attrgroup(EquipmentSlot.MAINHAND,
                    attr.strength.get(), new AttributeModifier(UUID.randomUUID(),
                    "木剑", 3, AttributeModifier.Operation.ADDITION)));
            changeattr.putattinattmap("minecraft:stone_sword", new changeattr.attrgroup(EquipmentSlot.MAINHAND,
                    attr.strength.get(), new AttributeModifier(UUID.randomUUID(),
                    "石剑", 9, AttributeModifier.Operation.ADDITION)));
        }
    }
    @SubscribeEvent
    public static void execute2(net.minecraftforge.event.entity.player.PlayerEvent event) {

    }
}
